from django.db import models
from apps.common.base.models import BaseModel
from apps.education.section.models import Section

class Courseware(BaseModel):

    section=models.ForeignKey(Section, related_name='section_courseware', verbose_name='章节', on_delete=models.SET_NULL, null=True, blank=True, db_constraint=False)

    name = models.CharField("名称", max_length=200, blank=True, null=True, default='')
    url = models.CharField("下载地址", max_length=200, blank=True, default='')

    class Meta:
        verbose_name = 'Courseware'
        verbose_name_plural = verbose_name
